/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package simplemetrosystem.control;

import java.awt.geom.Point2D;
import simplemetrosystem.model.Command.MouseCommand.PointDisployCommand;
import simplemetrosystem.view.MetroFrame;

/**
 *
 * @author Eric Qian
 */
public class MouseCommandManager {

    /**
     * 
     * @return
     */
    public static MouseCommandManager getInstance() {
        return mouseCommandManager;
    }

    /**
     * 
     * @param frame
     * @return
     */
    public static MouseCommandManager newInstance(MetroFrame frame) {
        mouseCommandManager = new MouseCommandManager(frame);
        return mouseCommandManager;
    }

    private MouseCommandManager(MetroFrame frame) {
        this.frame = frame;
        
        pointDisployCommand = new PointDisployCommand(frame);
    }

    public void PointDisploy(Point2D point) {
        pointDisployCommand.setPoint(point);
        pointDisployCommand.execute();
    }
    
    private MetroFrame frame;
    private static MouseCommandManager mouseCommandManager;
    private PointDisployCommand pointDisployCommand;
}
